﻿using BCEntity.TMS.Contraband.ContrabandConfig;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.Contraband.ContrabandConfig
{
    public interface IContrabandConfigData
    {
        /// <summary>
        /// 删除违禁品配置
        /// </summary>
        /// <param name="contrabandConfigId">违禁品配置Id</param>
        /// <returns></returns>
        Task<int> DeleteAsync(int contrabandConfigId);

        /// <summary>
        /// 获取违禁品配置
        /// </summary>
        /// <param name="contrabandConfigId">违禁品配置Id</param>
        /// <returns></returns>
        Task<ContrabandConfigEntity> GetEntityAsync(int contrabandConfigId);

        /// <summary>
        /// 添加违禁品配置
        /// </summary>
        /// <param name="entity">违禁品配置信息</param>
        /// <returns></returns>
        Task<ContrabandConfigEntity> InsertAsync(ContrabandConfigEntity entity);

        /// <summary>
        /// 更新违禁品配置
        /// </summary>
        /// <param name="entity">违禁品配置信息</param>
        /// <returns></returns>
        Task<ContrabandConfigEntity> UpdateAsync(ContrabandConfigEntity entity);

        /// <summary>
        /// 根据ContrabandCategoryId(违禁品分类Id)获取违禁品配置
        /// </summary>
        /// <param name="contrabandCategoryId">违禁品分类Id</param>
        /// <returns></returns>
        Task<IEnumerable<ContrabandConfigEntity>> GetByContrabandCategoryId(int contrabandCategoryId);

        /// <summary>
        /// 查询违禁品配置
        /// </summary>
        /// <param name="contrabandCategoryId">违禁品分类Id</param>
        /// <param name="createStartDate">创建开始日期</param>
        /// <param name="createEndDate">创建结束日期</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<ContrabandConfigViewEntity>, int)> Query(int? contrabandCategoryId, DateTime? createStartDate, DateTime? createEndDate, int pageIndex, int pageSize);

        /// <summary>
        /// 获取违禁品配置列表
        /// </summary>
        /// <param name="contrabandCategoryId">违禁品分类Id</param>
        /// <returns></returns>
        Task<IEnumerable<ContrabandConfigViewEntity>> GetList(int? contrabandCategoryId);
    }
}